<div class="form">
<?php
$form = $this->beginWidget('CActiveForm', array(
    'id' => 'login-form',
    'enableClientValidation' => true,
    'clientOptions' => array(
        'validateOnSubmit' => true,
    ),
));
?>

<div class="form-group">
    <?php echo $form->labelEx($model, 'username', array('style'=>'width:30%')); ?>
    <?php echo $form->textField($model, 'username', array('placeholder'=>Yii::t('other/form', 'Enter Username'), 'class'=>'form-control', 'style'=>'display:inline;width:65%')); ?>
</div>
    <?php echo $form->error($model, 'username'); ?>
<div class="form-group">
    <?php echo $form->labelEx($model, 'password', array('style'=>'width:30%')); ?>
    <?php echo $form->passwordField($model, 'password', array('placeholder'=>Yii::t('other/form', 'Enter Password'), 'class'=>'form-control', 'style'=>'display:inline;width:65%')); ?>
<?php /**
    * there is no need for this hint any longer
    * @author : xgqin <xgqin@guet.edu.cn>
    * @date   : 01/31/2013
    <p class="hint">
    Hint: You may login with <kbd>demo</kbd>/<kbd>demo</kbd> or <kbd>admin</kbd>/<kbd>admin</kbd>.
    </p>
 */ ?>
                </div>
                <?php echo $form->error($model, 'password'); ?>
                <?php /* The following code snippet is used to generate the verification code */ ?>
                <?php /* @author : xgqin <xgqin@guet.edu.cn> */ ?>
                <?php /* @date : 01/31/2013 */ ?>
                <?php if (CCaptcha::checkRequirements()): ?>
                <div class="form-group">
                        <?php echo $form->labelEx($model, 'verifyCode', array('style'=>'width:40%')); ?>
                        <?php echo $form->textField($model, 'verifyCode', array('class'=>'form-control', 'style'=>'display:inline;width:55%')); ?><br/>
                        <?php $this->widget('CCaptcha'); ?>
                    </div>
                    <?php echo $form->error($model, 'verifyCode'); ?>
                <?php endif; ?>

                <div class="footer">
                    <a href="<?php echo yii::app()->baseUrl.'/user/Register'?>" class="btn btn-primary pull-right" style="margin-left:10px">注册</a>
                    <?php echo CHtml::submitButton('登陆', array('class' => 'btn btn-primary pull-right')); ?>
                </div>

                <?php $this->endWidget(); ?>
            </div><!-- form -->

